treeview: Ensure the event is consumed on ::row-activate
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 2 Jun 2014 15:47:10 +0000 (17:47 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 2 Jun 2014 16:38:25 +0000 (18:38 +0200)
Otherwise the event is possibly handled, but still propagated further anyway.
Ensure the event is consumed by claiming the current sequence on the
GtkGestureMultiPress::pressed handler.

gtk/gtktreeview.c

index f6b973b4105c9197bfa9782baeb94cfc016ff1a8..713203e9c33a0360f3aaa01901686f5135ec6f91 100644 (file)
@@ -1755,7 +1755,10 @@ _tree_view_multipress_pressed (GtkGestureMultiPress *gesture,
                                  &path, &column, NULL, NULL);
 
   if (n_press == 2 || (n_press == 1 && tree_view->priv->activate_on_single_click))
-    gtk_tree_view_row_activated (tree_view, path, column);
+    {
+      gtk_tree_view_row_activated (tree_view, path, column);
+      gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
+    }
   else
     {
       if (n_press == 1)